{extend name="common:main_clean" /}
{block name="cssjs"}
<script type="text/javascript" src="__PUBLIC__/static/js/admin/provider.js?{$Think.config.html_v}"></script>
{/block}
{block name="content"}
<div class="form-inline" style="border-bottom:1px solid #ddd;padding:10px 0;">
	<div class="form-group form-group-sm">
		<label>名称</label>
		<input type="text" id="search_title" class="form-control"  placeholder="模糊搜索" />
	</div>
	<div class="form-group form-group-sm">
		<label>网址</label>
		<input type="text" id="search_url" class="form-control" placeholder="模糊搜索" />
	</div>
	<button type="button" class="btn btn-default btn-sm" id="btn_search">搜索</button>
</div>

<form id="form_list" method="post" action="{:url('Provider/authkeys_save')}">
{:html_usertoken()}
<input type="hidden" name="same_as_pwd" value="" />
<table id="list_table" class="table table-hover" style="margin-bottom:0;">
	<thead>
		<tr>
			<th>第三方平台</th>
			<th>通信密钥（留空使用全局设置）</th>
		</tr>
	</thead>
	<tbody>
	{foreach name="list" item="item"}
		<tr class="form-group-sm" data-prov-id="{$item['id']}">
			<td style="vertical-align:middle;">{$item['title']} （{$item['url']}）</td>
			<td>
				<input type="text" name="authkeys[{$item['id']}]" class="form-control" value="{$item['authkey']}" placeholder="全局设置：{:g_sc_c('store','authkey')?g_sc_c('store','authkey'):'空值'}">
			</td>
		</tr>
	{/foreach}
	</tbody>
	<tfoot>
		<tr class="form-group-sm">
			<td colspan="2" style="padding-left:0;padding-right:0;"><button type="submit" class="btn btn-default btn-block">修改</button></td>		
		</tr>
	</tfoot>
</table>
</form>
{$pagenav}
<script type="text/javascript">
providerClass.init_authkeys({$search|json_encode});
</script>
{/block}